﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DemoQLKhoSX.Library;
using DemoQLKhoSX.PresentationLayer;
namespace DemoQLKhoSX
{
    public partial class FrmMain : Form
    {
        FrmLogin fDangNhap = new FrmLogin();
        public FrmMain()
        {
            fDangNhap.ShowDialog();
            if (CurrentInformation.UserLogon)
            {
                InitializeComponent();
            }
            else
            {
                MessageBox.Show("Đăng nhập phần mềm mới được sử dụng");
            }
        }

        private void khoThanhPhâmToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void đăngXuâtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc chắn muốn thoát", "System warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                this.Close();
            }
        }

        private void xuâtThanhPhâmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmXuat fXuat = new FrmXuat();
            fXuat.MdiParent = this;
            fXuat.Show();
        }

        private void hangToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHang fhang = new frmHang();
            fhang.MdiParent = this;
            fhang.Show();
        }

        private void nhâpThanhPhâmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmNhap fnhap = new FrmNhap();
            fnhap.MdiParent = this;
            fnhap.Show();
        }
    }
}
